package com.attilax.oodb.imp;

import java.util.Map;

import com.attilax.oodb.PARTITION_BY_LIST;
import com.attilax.oodb.Partition;
import com.attilax.oodb.Prop;
import com.attilax.oodb.Table;
import com.attilax.oodbStoreEngine.FolderStoreEngine;
import com.google.common.collect.Maps;

public class MovTable extends Table {
	
	public void getProps(Map m, String f, String partName) {
		m.put("cate",partName);
		m.put("post_title",f);
		m.put("img",partName+"/"+f+"/"+f+".jpg");
		m.put("id",partName+"/"+f+"/"+f+".mkv");
		if(f.equals("meta.json"))
		{
			// meta 2 map  
		}
		
	}
	
	public MovTable() {
		this.ENGINE=new FolderStoreEngine();
		this.ENGINE.tab=this;
		this.name="mov";
		
		 Prop p=new Prop();
		 p.name="name";
		 p.type="int";
		 p.cantBeNull=false;
		 this.props.add(p);
		// Prop p=;
//		 p.name="name";
//		 p.type="int";
//		 p.cantBeNull=false;
		 this.props.add(new Prop("path"));
		 this.props.add(new Prop("pic"));
		 this.props.add(new Prop("intro"));
		 
		 this.storePath="z:";
		 //pat by list
		 Partition pt=new PARTITION_BY_LIST("cate");
		 pt.colKey="cate";
		 pt.colVal="爱情类";
		 this.parts.add(pt);
		 
		 Partition pt2=new PARTITION_BY_LIST();
		 pt2.colKey="cate";
		 pt2.colVal="动画类";
		 this.parts.add(pt2);
		 
		 
		 
		 
	//	Map m=Maps.newConcurrentMap();
	//	m.put
		 
		
	}
	
	

}
